package com.example.demo.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class User {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private String name;
    private String password;
    private String email;
    //用户状态：正常0，禁言1, 数据库中默认0
    private Integer status;
    //角色：普通用户0，管理员1，数据库中默认0
    private Integer role;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
